package Review04;

public class Dog extends Pet{

    private String strain;

    public Dog() {
    }

    public Dog(String name,int health,int love,String strain) {
        System.out.println("狗");
        super.setName(name);
        super.setHealth(health);
        super.setLove(love);
        this.strain=strain;
    }

    @Override
    public void print() {
        super.print();
        System.out.println("品种"+strain);
    }

    public String getStrain() {
        return strain;
    }

    public void setStrain(String strain) {
        this.strain = strain;
    }
}
